package com.dao.lx;

import java.math.BigDecimal;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.entity.Complain;

public interface ComplainDAO extends JpaRepository<Complain, Long>{
	@Query("from Complain c where c.complainClassify like ?1 and c.complainIfdelete = 1")
	public Page<Complain> queryByComplainClassify(String complainClassify, Pageable p);
	
	@Query("from Complain c where c.complainUrgency like ?1 and c.complainIfdelete = 1")
	public Page<Complain> queryByComplainUrgency(BigDecimal complainUrgency, Pageable p);
	
	@Query("from Complain c where c.complainResults like ?1 and c.complainIfdelete = 1")
	public Page<Complain> queryByComplainResults(String complainResults, Pageable p);

	@Query("from Complain c where c.complainDas like ?1 and c.complainIfdelete = 1")
	public Page<Complain> queryByComplainDas(String complainDas, Pageable p);
	
	@Query("from Complain c where c.complainIfdelete = 1")
	public Page<Complain> findAllComplainIfdelete1(Pageable p);
}
